﻿using DevExpress.XtraGrid.Demos.util;
using DiaoPaiDaYin;
using DXApplicationTangche.DTO;
using DXApplicationTangche.UC.样品管理.样品订单预览;
using DXApplicationTangche.UC.订单.service;
using DXApplicationTangche.UC.订单一览新.订单预览新;
using DXApplicationTangche.UC.销售台账.model;
using DXApplicationTangche.UC.销售台账.service;
using mendian;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DXApplicationTangche.UC.生产下单
{
    public partial class Form生产下单订单门户 : DevExpress.XtraBars.Ribbon.RibbonForm
    {
        private String shopId { get; set; }
        private Boolean is客户套号;   //  用于客户套号和补货
        private List<OrderStatusSaleIndexDTO> list = new List<OrderStatusSaleIndexDTO>();
        private List<OrderDailyConfirmDTO> OrderDailyConfirmDTOs = new List<OrderDailyConfirmDTO>();
        private XtraUserControl销售日记账 xtraUserControl销售日记账;
        private XtraUserControl坚山xml看板 xtraUserControl坚山xml看板;


        public Form生产下单订单门户()
        {
            InitializeComponent();
        }
        private void onLoadUC()
        {
            this.xtraUserControl销售日记账 = new XtraUserControl销售日记账(this.shopId);
            if ("50".Equals(this.shopId))
            {
                this.xtraUserControl销售日记账 = new XtraUserControl销售日记账(this.shopId, this.is客户套号);
            }
            this.xtraUserControl销售日记账.Dock = DockStyle.Fill;
            this.panel1.Controls.Clear();
            this.panel1.Controls.Add(this.xtraUserControl销售日记账);
        }
        private void onLoad坚山xmlUC()
        {
            this.xtraUserControl坚山xml看板 = new XtraUserControl坚山xml看板();
            this.xtraUserControl坚山xml看板.Dock = DockStyle.Fill;
            this.panel1.Controls.Clear();
            this.panel1.Controls.Add(this.xtraUserControl坚山xml看板);
        }

        private void barButtonItem定制看板_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.shopId = "18";
            this.onLoadUC();           
        }

        private void barButtonItem客户套号看板_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.shopId = "50";
            this.is客户套号 = true;
            this.onLoadUC();
        }

        private void barButtonItem补货套号看板_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.shopId = "50";
            this.is客户套号 = false;
            this.onLoadUC();
        }
        private void barButtonItem样衣看板_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.shopId = "48";
            this.onLoadUC();
        }

        private void barButtonItem上海Luna_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.shopId = "51";
            this.onLoadUC();
        }

        private void barButtonItem日本坚山xml下单_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.shopId = "46";
            this.onLoad坚山xmlUC();
        }

        private void barButtonItem美国坚山_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.shopId = "49";
            this.onLoadUC();
        }

        private void barButtonItem日本坚山_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.shopId = "46";
            this.onLoadUC();
        }

        private void barButtonItem上海坚山_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.shopId = "52";
            this.onLoadUC();
        }

        private void barButtonItem抖音套号_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.shopId = "11";
            this.onLoadUC();
        }
    }
}
